<?php  
//  	include("conn.php");
$hostname_conn = "localhost";
$database_conn = "xdq";
$username_conn = "root";//没改的话一般时root
$password_conn = "123456";
$lessonid= $_POST['id'];
$conn = mysqli_connect($hostname_conn, $username_conn, $password_conn,$database_conn)or trigger_error(mysqli_error(),E_USER_ERROR);

  	$lessonid = $_POST['lessonid']; 
  	$openid = $_POST['userid'];

    $sql = "delete from addLesson where lessonid = '$lessonid' and openid='$openid'"; 
    //mysqli_query($conn, $sql);
    //echo $lessonid.$openid;
    //echo json_encode($result,JSON_UNESCAPED_UNICODE|JSON_PRETTY_PRINT);
    if(mysqli_query($conn, $sql)){
      echo 'true';
    }else{
      echo 'false';
    }

?>  